0 CLS0:CLEAR200:DIMG(5,5),C$(15),I,J,Z,X,Y,C,M,L,S,W,X$,H:I=RND(-(PEEK(9)*256+PEEK(10))):POKE49151,64:GOTO1000
1 G(X,Y)=2:RETURN
2 X=RND(4):Y=RND(4):IFG(X,Y)=0THENON-(RND(0)<.9)GOTO1:G(X,Y)=4:RETURN
3 GOTO2
50 CLS:PRINT:IFMTHENGOSUB2
70 L=1:W=0:FORI=1TO4:PRINT"  ";:FORJ=1TO4:IFG(I,J)=0THENPRINT"€€€€€€€";:NEXT:GOTO90
80 C=LOG(G(I,J))/LOG(2):PRINTC$(C);:NEXT
90 PRINT"    ";:FORJ=1TO4:IFG(I,J)=2048THENW=-1:L=0
130 IFG(I,J)=0THENL=0:PRINT"€€€€€€€";:GOTO150
140 C=LOG(G(I,J))/LOG(2):Z=LEN(STR$(G(I,J))):PRINTRIGHT$(C$(C)+RIGHT$(STR$(G(I,J)),Z-1),5);LEFT$(C$(C),2);
150 NEXT:PRINT"    ";:FORJ=1TO4:IFG(I,J)=0THENPRINT"€€€€€€€";:NEXT:PRINT:NEXT:GOTO190
151 C=LOG(G(I,J))/LOG(2):PRINTC$(C);:NEXT:PRINT:NEXT
190 X$=INKEY$:IFX$=""THEN190
200 IFWTHENPRINT"YOU WIN!!!",:GOTO620
210 M=0:IFX$="0"THEN620
230 IFX$<>"W"THEN300
240 FORJ=1TO4:FORZ=1TO3:FORI=2TO4:IFG(I,J)THENIFG(I-1,J)=0THENG(I-1,J)=G(I,J):G(I,J)=0:M=1
250 NEXT:NEXT:FORI=2TO4:IFG(I,J)THENIFG(I-1,J)=G(I,J)THENG(I-1,J)=G(I,J)*2:G(I,J)=0:M=1:S=S+G(I-1,J)
280 NEXT:NEXT:FORJ=1TO4:FORZ=1TO3:FORI=2TO4:IFG(I,J)THENIFG(I-1,J)=0THENG(I-1,J)=G(I,J):G(I,J)=0:M=1
290 NEXT:NEXT:NEXT:GOTO600
300 IFX$<>"A"THEN400
310 FORI=1TO4:FORZ=1TO3:FORJ=2TO4:IFG(I,J)THENIFG(I,J-1)=0THENG(I,J-1)=G(I,J):G(I,J)=0:M=1
320 NEXT:NEXT:FORJ=2TO4:IFG(I,J)THENIFG(I,J-1)=G(I,J)THENG(I,J-1)=G(I,J)*2:G(I,J)=0:M=1:S=S+G(I,J-1)
330 NEXT:NEXT:FORI=1TO4:FORZ=1TO3:FORJ=2TO4:IFG(I,J)THENIFG(I,J-1)=0THENG(I,J-1)=G(I,J):G(I,J)=0:M=1
340 NEXT:NEXT:NEXT:GOTO600
400 IFX$<>"S"THEN500
410 FORI=1TO4:FORZ=1TO3:FORJ=3TO1STEP-1:IFG(I,J)THENIFG(I,J+1)=0THENG(I,J+1)=G(I,J):G(I,J)=0:M=1
420 NEXT:NEXT:FORJ=3TO1STEP-1:IFG(I,J)THENIFG(I,J+1)=G(I,J)THENG(I,J+1)=G(I,J)*2:G(I,J)=0:M=1:S=S+G(I,J+1)
430 NEXT:NEXT:FORI=1TO4:FORZ=1TO3:FORJ=3TO1STEP-1:IFG(I,J)THENIFG(I,J+1)=0THENG(I,J+1)=G(I,J):G(I,J)=0:M=1
440 NEXT:NEXT:NEXT:GOTO600
500 IFX$<>"Z"THEN190
510 FORJ=1TO4:FORZ=1TO3:FORI=3TO1STEP-1:IFG(I,J)THENIFG(I+1,J)=0THENG(I+1,J)=G(I,J):G(I,J)=0:M=1
520 NEXT:NEXT:FORI=3TO1STEP-1:IFG(I,J)THENIFG(I+1,J)=G(I,J)THENG(I+1,J)=G(I,J)*2:G(I,J)=0:M=1:S=S+G(I+1,J)
530 NEXT:NEXT:FORJ=1TO4:FORZ=1TO3:FORI=3TO1STEP-1:IFG(I,J)THENIFG(I+1,J)=0THENG(I+1,J)=G(I,J):G(I,J)=0:M=1
540 NEXT:NEXT:NEXT:GOTO600
600 IFM=0ANDLTHENPRINT"YOU LOSE!",:GOTO620
610 GOTO50
620 IFS>HTHENH=S
630 PRINT"SCORE"S:PRINT"HIGH"H,"PLAY AGAIN Y/N?";
640 X$=INKEY$:IFX$="Y"THEN1020
650 IFX$="N"THENEND
660 GOTO640
1000 FORC=1TO8:FORI=1TO7:C$(C)=C$(C)+CHR$(143+((C-1)*16)):NEXT:NEXT
1010 FORC=9TO15:FORI=1TO7:C$(C)=C$(C)+CHR$(137+((C-8)*16)):NEXT:NEXT
1020 CLS:FORI=0TO5:FORJ=0TO5:G(I,J)=0:NEXT:NEXT:S=0:M=1:GOSUB2:GOTO50
